#!coding=utf-8
from models import *
from django.contrib import admin

class StoreAdmin(admin.ModelAdmin):
    list_display = ('id','uid','storeName','storePhone','storeAddress','disable')

class InformationCategoryAdmin(admin.ModelAdmin):
	list_display = ('id','name')

class InformationAdmin(admin.ModelAdmin):
	list_display = ('id','title','source','category','createTime','disable')

	def category(self, obj):
		return obj.category.name

class HospitalAdmin(admin.ModelAdmin):
    list_display = ('id','hospitalName','hospitalPhone','hospitalAddress','hospitalLevel','disable')

class HealthRecordsAdmin(admin.ModelAdmin):
    list_display = ('id','userName','userSex','userPhone','createTime','disable')

class PharmacistsServiceAdmin(admin.ModelAdmin):
    list_display = ('id','pharmacistsName','pharmacistsSex','pharmacistsPhone','disable')


admin.site.register(Store,StoreAdmin)
admin.site.register(Information,InformationAdmin)
admin.site.register(Hospital,HospitalAdmin)
admin.site.register(HealthRecords,HealthRecordsAdmin)
admin.site.register(PharmacistsService,PharmacistsServiceAdmin)
admin.site.register(InformationCategory,InformationCategoryAdmin)